using NHibernate;
using NUnit.Framework;

namespace FluentlyDo.Tests
{
    [TestFixture]
    public class PersonRepositoryTests
    {
        [Test]
        public void GetByAgeShouldNotThrowException()
        {
            SessionManager manager = new SessionManager();

            ISessionFactory factory = manager.CreateSessionFactory();

            PersonRepository repository = new PersonRepository(factory);

            var persons = repository.GetByAgeRange(1, 2);
        }

        [Test]
        public void GetByAgeShouldNotThrowExceptionWhenNullsArePassed()
        {
            SessionManager manager = new SessionManager();

            ISessionFactory factory = manager.CreateSessionFactory();

            PersonRepository repository = new PersonRepository(factory);

            var persons = repository.GetByAgeRange(null, null);
        }

        [Test]
        public void MultiSearch()
        {
            SessionManager manager = new SessionManager();
            ISessionFactory factory = manager.CreateSessionFactory();
            PersonRepository repository = new PersonRepository(factory);

            repository.Search();


        }
        
    }
}